﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Win32;

namespace FrankensteamServer
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

         private void MinimiseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Minimized;
        }

        private void CloseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void MaximiseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Maximized;
            Button MaximiseButton = (Button)sender;
            MaximiseButton.Click -= new RoutedEventHandler(NormaliseWindow_Click); //set it to null from last usage
            MaximiseButton.Content = "o";
            MaximiseButton.Click += new RoutedEventHandler(NormaliseWindow_Click);
        }

        private void NormaliseWindow_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Normal;
            Button MaximiseButton = (Button)sender;
            MaximiseButton.Click -= new RoutedEventHandler(NormaliseWindow_Click); //set it to null from last usage
            MaximiseButton.Content = "O";
            MaximiseButton.Click += new RoutedEventHandler(MaximiseWindow_Click);
        }

        private void MenuBar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void StartServer_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("START SERVER");
        }

        private void StopServer_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("STOP SERVER");
        }

        private void BanUser_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("BAN USER");
        }

        private void KickUser_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("KICK USER");
        }

        private void SendMessage_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("SEND MESSAGE");
        }

        private void ViewProj_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("VIEW PROJECT");
        }

        private void DeleteProj_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("DELETE PROJECT");
        }

        private void EditProj_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("EDIT PROJECT");
        }

        private void SaveSettings_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("SAVE SETTINGS");
        }

        private void Reboot_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("REBOOT");
        }

        private void ClearLog_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("CLEAR LOG");
        }

        private void CopyLog_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("COPY LOG");
        }

        private void ExportLog_Click(object sender, RoutedEventArgs e)
        {
            DisplayMessage("EXPORT LOG");
        }




        private void DisplayMessage(string messageBoxText)
        {
            string caption = "FRANKENSTEAM";
            MessageBoxButton button = MessageBoxButton.OKCancel;
            MessageBoxImage icon = MessageBoxImage.Question;
            MessageBox.Show(messageBoxText, caption, button, icon);

        }
    }
}
